package cn.lsj.readwriteseparation.service.impl;

import cn.lsj.readwriteseparation.entity.Address;
import cn.lsj.readwriteseparation.entity.User;
import cn.lsj.readwriteseparation.mapper.AddressMapper;
import cn.lsj.readwriteseparation.mapper.UserMapper;
import cn.lsj.readwriteseparation.model.bo.UserAddressBO;
import cn.lsj.readwriteseparation.service.AddressService;
import cn.lsj.readwriteseparation.service.UserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @className: UserServiceImpl
 * @description: TODO 类描述
 * @author: liangshijie
 * @date: 2022/12/5
 **/
@Service
@AllArgsConstructor
public class AddressServiceImpl extends ServiceImpl<AddressMapper, Address> implements AddressService {

    private final AddressMapper addressMapper;

    @Override
    public List<UserAddressBO> getUserAddress(Long userId) {
        return addressMapper.getUserAddress(userId);
    }
}
